package com.ht.service.impl;

import com.ht.dao.IUserMapper;
import com.ht.entity.User;
import com.ht.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Htao
 * 邮箱:hutao1993310@163.com
 * 2018/5/11
 * 业务层实现类
 */
@Service
public class IUserServiceImpl implements IUserService {


    @Autowired
    private IUserMapper iUserMapper;

    public List<User> listUserUser() {
        return iUserMapper.listUser();
    }

    public void deleteUserById(Integer id) {
        iUserMapper.deleteUserById(id);
    }

    public void addUser(User user) {
        iUserMapper.addUser(user);
    }

    /*根据id查询用户*/
    public User gitUserEditUI(Integer id) {

        return iUserMapper.gitUserEditUI(id);
    }

    /**
     * 根据id修改客户信息
     * @param user
     */
    public void updateUser(User user) {
        iUserMapper.updateUser(user);

    }

    public void deleteUserAll(Integer[] ids) {
        iUserMapper.deleteUserAll(ids);
    }

    public void login(String username, String password) {
        iUserMapper.login(username,password);

    }
}
